/* 
 * @author	Mabel Xu
 */

import info.gridworld.actor.Actor;
import java.util.ArrayList;

public class KingCrab extends CrabCritter
{
	public KingCrab()
	{
		super();
	}
	
	public void processActors(ArrayList<Actor> actors)
	{
		for (Actor a : actors)
		{
			int dir = this.getLocation().getDirectionToward(a.getLocation());
			if (a.getGrid().isValid(a.getLocation().getAdjacentLocation(dir)))
				a.moveTo(a.getLocation().getAdjacentLocation(dir));
			else
				a.removeSelfFromGrid();
		}
	}
}
